package com.java.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 样品管理-快递寄件管理
 * @author Administrator
 *
 */
@Entity
@org.hibernate.annotations.Entity(
		selectBeforeUpdate = true, 
		dynamicInsert = true, 
		dynamicUpdate = true
)
@Table(name="send_express")
public class SendExpress implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7707315905861321259L;
	
	@Id
	@GeneratedValue
	private Long id;
		
	/**
	 * 快递单号
	 */
	@Column(length=100)
	private String expressNumber;
	
	/**
	 * 所属快递公司
	 */
	@ManyToOne(optional=true)
	@JoinColumn(name="express_id",referencedColumnName="id")
	@NotFound(action=NotFoundAction.IGNORE)
	private Code expressCompany;
	
	/**
	 * 重量
	 */
	@Column(nullable=true)
	private Double weight=0d;
	
	/**
	 * 价格费用
	 */
	@Column(nullable=true)
	private Double price=0d;
	
	/**
	 * 收件人国家
	 */
	@Column(length=100)
	private String country;
	
	/**
	 * 寄件日期
	 */
	@Temporal(TemporalType.TIMESTAMP)	
	private Date sendDate;
		
	/**
	 * 业务员
	 */
	@ManyToOne(optional=true)
	@JoinColumn(name="user_id",referencedColumnName="id")
	@NotFound(action=NotFoundAction.IGNORE)
	private User user;
		
	/**
	 * 收件人
	 */
	@Column(length=100)
	private String sender;
	
	/**
	 * 寄件内容
	 */
	@Column(length=200)
	private String content;
	
	/**
	 * 付款方式
	 */
	@Column
	private Boolean paymentMethod;
	
	public Boolean getPaymentMethod() {
		return paymentMethod;
	}

	public void setPaymentMethod(Boolean paymentMethod) {
		this.paymentMethod = paymentMethod;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	/**
	 * 寄件公司
	 */
	@Column(length=200)
	private String company;
	
	/**
	 * 寄件人地址
	 */
	@Column(length=200)
	private String address;
		
	/**
	 * 寄件人电话
	 */
	@Column(length=30)
	private String telphone;
			
	/**
	 *备注
	 */
	@Column(length=200)
	private String detail;
	
	
	public String getExpressNumber() {
		return expressNumber;
	}

	public void setExpressNumber(String expressNumber) {
		this.expressNumber = expressNumber;
	}

	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public Date getSendDate() {
		return sendDate;
	}

	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Code getExpressCompany() {
		return expressCompany;
	}

	public void setExpressCompany(Code expressCompany) {
		this.expressCompany = expressCompany;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTelphone() {
		return telphone;
	}

	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}
